package com.hxy.service;

import com.hxy.entity.Frut;
import com.hxy.mapper.FrutMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2021-07-26
 */
@Service
public class FrutServiceImpl extends ServiceImpl<FrutMapper, Frut>  {
 @Resource
 FrutMapper frutMapper;
 public List<Frut> select(){
     return frutMapper.select();
 }
     public int delete(Integer fid){
         return frutMapper.deleteById(fid);
     }
    public int update(Frut frut){
        return frutMapper.updateById(frut);
    }
    public int add(Frut frut){
        return frutMapper.insert(frut);
    }
    public Frut selectID(Integer id) {
        Frut frut = frutMapper.selectById(id);
        return frut;
    }
}
